package com.example.chainofresponsibilitypattern.entity;

/**
 * @author ash
 * @description
 * @create 2023/2/22  23:37:28
 * @className ConcreteHandler2
 * @verson 1.0.0
 */
public class ConcreteHandler2 extends Handler{

    @Override
    public void handlerRequest(int request) {
        if (request > 10 && request <= 20){
            System.out.println("执行请求2");
        } else if (successor != null) {
            System.out.println("2权限不足，进入下一级请求");
            successor.handlerRequest(request);
        }
    }
}
